package com.ganzhi.controller;

import com.ganzhi.domain.User;
import com.ganzhi.service.impl.service.UserService;
import com.ganzhi.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Controller
public class UserController {

    @Autowired
    private UserService userService;



    @PostMapping("/login")
    public ResponseResult login(@RequestBody User user){
        return userService.login(user);
    }

    @PostMapping("/play")
    public ResponseResult play(@RequestBody User user){
        return userService.login(user);
    }
}
